An intermediate object linking method in the background art will be explained with reference to FIG. 6.
FIG. 6 is a flowchart of the intermediate object linking method in the background art. First, a list of intermediate objects as linked object is input (step 50). Then, the linking process such as the linking of the intermediate objects, etc. are executed in compliance with the order in the list of the intermediate objects input in step 50 to form an executable object.
Then, the CPU that has a plurality of adressings for the memory access holds a plurality of branch instructions in response to branch distances in the formed executable object.
Here, the program size of the branch instruction is different based on the branch distance. More particularly, the program size of the branch instruction is increased larger as the branch distance becomes longer. In addition, since this branch distance is changed according to the linking order when the intermediate objects are linked, sometimes the program size of the executable object containing the branch instruction is changed according to this linking order.
In general, the smaller program size is preferable. Therefore, the designer must prepare a number of linking orders of the intermediate objects, then form the executable object by executing the linking process such as the linking of the intermediate objects, etc. sequentially, and then search the linking order of the intermediate objects which permits the minimum program size of the executable object.
In the method in the background art, there are several problems to search the linking order of the intermediate objects that permits the minimum program size of the executable object.
First, the first problem is that, since the examination of the linking order of the intermediate objects is manually carried out, such examination to get the executable object of the minimum size takes much time and labor.
Then, the next problem is that, since the combination of the linking order of the intermediate objects is large in number, it takes a lot of time and it is very difficult to decide the linking order of the intermediate objects that can form the executable object of the minimum size. If the number of the intermediate objects is N, a total number of the linking order of the intermediate objects is increased up to N! (factorial).